xm: Unify the output of pci-list
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 29 May 2009 08:27:31 +0000 (09:27 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 29 May 2009 08:27:31 +0000 (09:27 +0100)
commit6b6ac58efc64b030b33aa23e8f12d70f4de73dc4
tree0d5c071c0873babb8fe3c33e6b2a34dd4694d5a2
parentc29ca7a0f26a250eab71a2ac671b212ae85a9c5b
xm: Unify the output of pci-list

This is another attempt at having pci-list produce consistent output.
Without this change there differences in the output of both vslots
and domain occur for domains that have never been started and domains
that have been started.

In order to address this I have taken the approach of
using integers where possible and explicitly formating them,
rather than relying on string representations that are present in
data structures.

I have also re-used the common part of the format, to try
and mitigate. the possibility of future inconsistencies there.

This patch also:
* Removes trailing whitespace
* Removes unnecessary brackets and whitespace from print invocations
* Prints the header outside of the loop to avoid having
  to maintain a state variable

Signed-off-by: Simon Horman <horms@verge.net.au>
tools/python/xen/xm/main.py